#include "common.h"

int main()
{
    //1.打开管道文件
    int fd = open(ipcPath, O_WRONLY);
    if(fd == -1) return errno;
    

    //2.进程间通信
    //char wbuff[BUFF_SIZE];
    string wbuff(BUFF_SIZE, 0);
    while(true)
    {
        cout << "please enter message line:" << endl;
        getline(cin, wbuff);
        write(fd, wbuff.c_str(), wbuff.size());
    }

    //3.关闭文件
    close(fd);
    return 0;
}